<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>async-await</title>
</head>
<body>
    
</body>
</html>

<script>
    function  interval(callback,delay){
        // 此处迷惑的话，将callback(id) 改下参数，看下报错即可。例如改为：callback(aa)
        // 这里的不熟其实是对作用域的不熟
        let id = setInterval(()=> callback(id),delay)
        console.log('执行器返回的id：',id);
    }

    interval(function(id){
        console.log(id);
    },1000)
</script>